home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9243 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.gate.net!!pbfreenet!p004927b
  2. From: p004927b@pbfreenet.seflin.lib.fl.us (Laura Michaels)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: C/C++ cross-platform compatibility
  5. Date: 7 Mar 1996 18:23:17 GMT
  6. Organization: SEFLIN Free-Net - Palm Beach
  7. Message-ID: <4hn9il$hh1@news.seflin.lib.fl.us>
  8. References: <4hfvlk$dn1@bay>
  9. NNTP-Posting-Host: pbfreenet.seflin.lib.fl.us
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. charrick@netrover.com wrote:
  13. : I'm working on an application I want to compile on many
  14. : different platforms.  Somewhere along the line, I need to
  15. : obtain a list of all files in a directory.  In OS/2, DOS,
  16. : WinNT, etc... the way to do this is with DosFindFirst and
  17. : DosFindNext.  However, these are not part of the ANSI
  18. : standard, so I want to know, what should I use?  Are these
  19. : actually supported on everything, or is there another way
  20. : to do this?
  21. : --------------------------
  22. : Stephane Charette, charrick@netrover.com
  23. --
  24.  
  25. Routines related to files and directories (iostreams or the C 
  26. stream functions excluded) are not usually portable across platforms.  If 
  27. it were me, I'd use the POSIX extensions for directory functions where 
  28. available.  I'd use #ifdefs to add code for platforms that aren't POSIX 
  29. compliant.
  30.  
  31.  
  32. Laura Michaels
  33. p004927b@pbfreenet.seflin.lib.fl.us
  34. http://members.aol.com/lauram3017/index.html
  35.  
  36.